﻿using System;
using Eamon.MeituanDotnetSDK.api.common;
using Eamon.MeituanDotnetSDK.api.oauth.entity;
using Eamon.MeituanDotnetSDK.@enum;

namespace Eamon.MeituanDotnetSDK.api.oauth
{
    [Obsolete("新的文档里没找到相关的说明，应该没有再用了")]
    public class AuthorizePlatform : AbstractAPI<TokenResponse>
    {
        public AuthorizePlatform(AuthorizePlatformRequest request)
        {
            this.apiRequest = request;
        }

        public AuthorizePlatform()
        {
        }


        public override HttpMethodEnum getHttpMethod()
        {
            return HttpMethodEnum.POST;
        }


        public override string getHttpUrl()
        {
            return "https://openapi.dianping.com/router/oauth/token";
        }


        public override AuthenticateType getAuthenticateType()
        {
            return AuthenticateType.OAUTH;
        }


        public override Type getResponseClass()
        {
            return typeof(TokenResponse);
        }


        public override Type getRequestClass()
        {
            return typeof(RefreshTokenRequest);
        }

        public override string getMethod()
        {
            return "oauth.token";
        }
    }

}